package com.twu.biblioteca;

import java.util.Date;
import java.util.Objects;

/**
 * Created by Binsabbar on 23/09/2014.
 */
public class Book {

  String bookTitle;
  Author author;
  int publicationYear;

  public Book(String bookTitle, Author author, int publicationYear) {
    this.bookTitle = bookTitle;
    this.author = author;
    this.publicationYear = publicationYear;
  }


  public boolean equals(Object object){
    if (!(object instanceof Book)) return false;

    Book anotherBook = (Book) object;
    if (bookTitle.equals(anotherBook.bookTitle) && author.equals(anotherBook.author) &&
        publicationYear == anotherBook.publicationYear)
      return true;

    return false;
  }
}
